import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)

const store = new Vuex.Store({
	state: {
		isxsd:false,
		userskey:{
			phone: '',
			password: '', // 注册密码	
			verification_key: '', // 获取短信验证码接口返回的KEY	
			verification_code: '' // 短信验证码
		},
		userinfo:'',
		cars:"",//当前车辆,
		isopencar:666,
		isintcar:false, // 是否初始化
		intdevsn:false, // 是否在控制面板
		intdevsncar:false, // 绑定的设备
		testform:{ // 测试表单
			jhhgdfa: '', // 输入框
			jhhgdfb: '' // 选中的车辆
		}
	},
	mutations: {
		setuserskey(state,data) {
			state.userskey = data
		},
		setintdevsn(state,data) {
			state.intdevsn = data
		},
		setintdevsncar(state,data) {
			state.intdevsncar = data
		},
		setuserinfo(state,data) {
			state.userinfo = data
		},
		 currentcars(state,data) {
		    state.cars = data;
	    },
		setisopencar(state,data) {
			state.isopencar = data
		},
		setisintcar(state,data) {
			state.isintcar = data
		}
	}
})

export default store
